package com.biz.service.MService.goods;

import com.biz.model.Hmodel.base.TWxGoods;
import com.biz.model.Pmodel.base.PWxGoods;
import com.biz.model.Pmodel.base.PbasePics;
import com.biz.model.Pmodel.order.PorderDetail;
import com.biz.model.common.MessageBox;
import com.biz.service.HService.base.BaseServiceI;

import java.util.List;
import java.util.Map;

/**
 * @author lzq
 */
public interface GoodsServiceI extends BaseServiceI<TWxGoods> {

    /**
     * 加载商品列表
     */
    List<PWxGoods> getGoodsList() throws Exception;

    /***
     * 获取商品详情
     */
    PWxGoods getGoodsDetialById(String goodsId) throws Exception;

    /**
     * 获取商品轮播
     */
    List<PbasePics> getPicsByGoodsList(String goodsId)throws Exception;

    /**
     * 兑换逻辑
     */
    MessageBox doCharge(String goodsId, String userId);

    /**
     * 验证用户和订单是否一致
     */
    boolean testUserOrdersByUserIdAndCode(String userId, String code);


    /**
     * 兑换记录
     */
    List<Map<String,Object>> getChargeHistory(String userId)throws Exception;

    /**
     * 获取订单
     */
    PorderDetail getOrderDetailByCode(String detailId)throws Exception;
}
